#include <stdio.h>
#include <string.h>
#include <stdbool.h>

int main()
{
    char *nums[7] = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
    bool flag = false;
    int length = sizeof(nums) / sizeof(nums[0]);

    for (int idx = 0; idx < length - 1; idx++)
    {
        for (int jdx = idx + 1; jdx < length; jdx++)
        {
            if (strcmp(nums[idx], nums[jdx]) > 0)
            {
                char *tmp = nums[idx];
                nums[idx] = nums[jdx];
                nums[jdx] = tmp;
            }
        }
    }

    for (int idx = 0; idx < length; idx++)
    {
        printf("%s\n", nums[idx]);
    }

    return 0;
}